import {
  handleRequest
} from './index'
import request from '@/utils/request'
import {
  faceApiUrl
} from '../config'

/**
 * 总包签证报送审批 =============start
 * @param parameter
 */
//列表
export function getPageCommercialVisaSendApprove(parameter) {
  return request({
    url: faceApiUrl + '/commercialVisaSendApprove/getPageCommercialVisaSendApprove',
    method: 'post',
    data: parameter
  })
}

//统计
export function getCommercialVisaSendApproveCount(parameter) {
  return request({
    url: faceApiUrl + '/commercialVisaSendApprove/getCount',
    method: 'post',
    data: parameter
  })
}

// 删除
export function delCommercialVisaSendApprove(parameter) {
  return request({
    url: faceApiUrl + '/commercialVisaSendApprove/deleteByPrimaryKey/' + parameter.id,
    method: 'get',
  })
}

// 撤销
export function undoCommercialVisaSendApprove(parameter) {
  return request({
    url: faceApiUrl + '/commercialVisaSendApprove/cancelProcess/' + parameter.id,
    method: 'get',
  })
}

// 作废
export function revokeCommercialVisaSendApprove(parameter) {
  return request({
    url: faceApiUrl + '/commercialVisaSendApprove/Revoke/' + parameter.id,
    method: 'get',
  })
}

// 新增
export function addCommercialVisaSendApprove(parameter) {
  return request({
    url: faceApiUrl + '/commercialVisaSendApprove/insertSelective',
    method: 'post',
    data: parameter
  })
}

// 修改
export function updateCommercialVisaSendApprove(parameter) {
  return request({
    url: faceApiUrl + '/commercialVisaSendApprove/updateByPrimaryKeySelective',
    method: 'post',
    data: parameter
  })
}

// 详情
export function getCommercialViasSendApproveById(parameter) {
  return request({
    url: faceApiUrl + '/commercialVisaSendApprove/getCommercialViasSendApproveById',
    method: 'get',
    params: parameter
  })
}
/**
 * 总包签证报送审批 =============end
 */


// 总计量分页
//获取-总计量分页查询
export function getMeasureList(query) {
  return handleRequest({
    url: '/measure-count/list',
    method: 'post',
    data: query
  })
}

//统计-目标责任书
export function getMeasureCount(query) {
  return handleRequest({
    url: '/measure-count/count',
    method: 'post',
    data: query
  })
}
//新增/修改-目标责任书
export function addMeasure(query) {
  return handleRequest({
    url: '/measure-count/addOrUpdate',
    method: 'post',
    data: query
  })
}


//删除-目标责任书
export function delMeasure(query) {
  return handleRequest({
    url: '/measure-count/delData',
    method: 'get',
    params: query
  })
}
//查看-目标责任书
export function getMeasure(query) {
  return handleRequest({
    url: '/measure-count/detail',
    method: 'get',
    params: query
  })
}